package com.rzjm.exercise.module.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.rzjm.exercise.common.utils.ExcelColumn;
import com.rzjm.exercise.module.domain.dto.QuestionDto;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 问卷调查问题对象 survey_question
 *
 * @author ruoyi
 * @date 2021-09-05
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("survey_question")
public class SurveyQuestion implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 所在物业公司id
     */
    private Integer propertyId;

    /**
     * 问卷id
     */
    private Integer surveyId;

    /**
     * 调查主题
     */
    private String questionTitle;

    /**
     * 问题的类型 0 - 选择项  1-  输入项 2 - 多选 3 - 上传图片
     */
    private Integer questionType;

    /**
     * 备注说明
     */
    private String remark;

    /**
     * 问卷调查内容
     */
    private String question;

    /**
     * 回答 选项内容  json 格式
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String answerSection;

    /**
     * 问题状态
     */
    private Integer state;

    private Integer isRequire;

	/**
	 * 排序索引
	 */
	private Integer sort;
    /**
     * 添加时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(exist = false)
    private List<QuestionDto> sections;


    @TableField(exist = false)
    private Integer sectionsCount;


}
